package com.wxx.design.prototype;

/**
 * @author Jetwang
 * @version 1.0
 * @date 2022/4/15 21:58
 */
public class Test {
    public static void main(String[] args) throws CloneNotSupportedException {
        Mail mail = new Mail();
        mail.setContent("初始化模板~");
        for (int i = 0; i < 10; i++) {
            Mail clone = (Mail)mail.clone();
            clone.setName("姓名" + i);
            clone.setEmailAddress("姓名" + i + "@qq.com");
            clone.setContent("明天逸夫楼做核酸检测~");
            MailUtil.sendMail(clone);
        }
        MailUtil.saveOriginMailRecord(mail);
    }
}
